<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
		<title>收款</title>
		<link rel="stylesheet" type="text/css" href="css/public.css" />
	</head>
	<style type="text/css">
		/*移动端1px下边线*/
		
		.border {
			position: relative;
		}
		
		.border:after {
			content: '';
			display: block;
			position: absolute;
			width: 100%;
			left: 0px;
			bottom: 0px;
			height: 1px;
			background-color: #efefef;
			-webkit-transform: scaleY(0.5);
			transform: scaleY(0.5);
		}
		
		.nav {
			height: 3.4rem;
			background: #0d6fb8;
			padding-top: 0.5rem;
		}
		
		.icon {
			height: 1.1rem;
			width: 1.2rem;
			color: #fff;
			margin: 0 0.3rem 0.4rem 0.3rem;
			float: left;
			font-size: 0.5rem;
		}
		
		.icon .img {
			height: 0.88rem;
			width: 0.88rem;
			margin-left: 0.15rem;
		}
		
		.icon .imgon {
			background: url(img/kx.png) no-repeat;
			background-size: 100% 100%;
		}
		
		.icon .img img {
			height: auto;
			width: 0.58rem;
			margin-left: 0.05rem;
		}
		
		.icon .text {
			width: 1.4rem;
			height: 0.3rem;
			font-size: 0.28rem;
			margin-top: 0.12rem;
			margin-left: -0.08rem;
		}
		
		.box {
			height: 1.8rem;
			width: 7.1rem;
			background: #fff;
			margin: 0.3rem auto;
			border-radius: 5px;
			padding-top: 0.2rem;
		}
		
		.box .input {
			font-size: 0.3rem;
			margin-top: 0.23rem;
			color: #999;
		}
		
		.box .on {
			font-size: 0.48rem;
			color: #000;
			margin-top: 0.2rem;
		}
		
		.keyboard {
			height: 5.2rem;
			width: 7.5rem;
			background: #fff;
			margin-top: 0.7rem;
		}
		
		.keyboard .row {
			height: 1.3rem;
		}
		
		.keyboard .row .key {
			height: 1.3rem;
			width: 1.85rem;
			border-right: solid 1px #efefef;
			text-align: center;
			font-size: 0.6rem;
			line-height: 1.4rem;
			color: #4f4f4f;
		}
		
		.keyboard .row .key img {
			width: 0.58rem;
			height: auto;
		}
		
		.rowbox {
			height: 2.6rem;
			width: 5.62rem;
		}
		
		.bottom .quer {
			height: 2.6rem;
			width: 1.9rem;
			background: #0D6FB8;
			text-align: center;
		}
		
		.bottom .quer p {
			font-size: 0.3rem;
			color: #fff;
		}
		
		.model {
			position: fixed;
			left: 0;
			top: 0;
			background: rgba(0, 0, 0, .5);
			height: 100%;
			width: 100%;
		}
		
		.modelcont {
			height: 6.4rem;
			width: 6.4rem;
			background: #fff;
			position: absolute;
			left: 0.2rem;
			top: 3rem;
			border-radius: 5px;
			padding: 0.45rem 0.35rem;
		}
		
		.mdheader {
			height: 0.65rem;
			font-size: 0.34rem;
		}
		
		.mdheader img {
			width: 0.3rem;
			height: 0.3rem;
		}
		
		.modelcont .text {
			height: 1.75rem;
			font-size: 0.5rem;
			text-align: center;
			line-height: 1.75rem;
		}
		
		.modelcont .item {
			height: 1.35rem;
		}
		
		.modelcont .item-flase {
			background: #e5e5e5;
		}
		
		.modelcont .buttomquer {
			height: 0.88rem;
			width: 5.72rem;
			border-radius: 5px;
			background: #0D6FB8;
			color: #fff;
			font-size: 0.36rem;
			margin-left: 0.3rem;
			margin-top: 0.5rem;
			cursor: pointer;
		}
		
		.modelcont .item .itemleft {
			height: 1.35rem;
			width: 6rem;
		}
		
		.modelcont .item .rightarr img {
			width: 0.2rem;
			height: auto;
		}
		
		.itemlefthead {
			height: 0.48rem;
			margin-top: 0.2rem;
			font-size: 0.28rem;
		}
		
		.itemlefthead img {
			height: auto;
			width: 0.54rem;
		}
		
		.itemlefthead .tis {
			padding: 0.02rem 0.12rem;
			border: solid 1px #0d6fb8;
			color: #0d6fb8;
			border-radius: 5px;
			margin: 0 0.2rem;
		}
		
		.itemlefthead .td {
			margin-left: 0.7rem;
			margin-right: 0.5rem;
		}
		
		.itemlefttis {
			font-size: 0.24rem;
			margin-top: 0.1rem;
		}
		
		.itemleft img {
			height: auto;
			width: 0.46rem;
		}
		
		.itemleft p {
			font-size: 0.34rem;
			margin-left: 0.25rem;
		}
		
		#wrapper {
			height: 5.4rem;
			overflow: hidden;
			border-bottom: solid #E5E5E5 1px;
		}
		
		#wrapperbank {
			height: 5.4rem;
			overflow: hidden;
		}
		
		#payModel .rightarr img {
			width: 0.34rem;
			height: auto;
			display: none;
		}
		
		#payModel .payheader {
			height: 0.8rem;
			font-size: 0.3rem;
			margin-top: -0.44rem;
			border-bottom: solid 1px #E5E5E5;
		}
		
		#payModel .payheader img {
			height: 0.35rem;
			width: auto;
		}
		
		#payModel .payheader p {
			margin-left: 1.9rem;
		}
		
		#bankModel .rightarr img {
			width: 0.34rem;
			height: auto;
			display: none;
		}
		
		#bankModel .payheader {
			height: 0.8rem;
			font-size: 0.3rem;
			margin-top: -0.44rem;
			border-bottom: solid 1px #E5E5E5;
		}
		
		#bankModel .payheader img {
			height: 0.35rem;
			width: auto;
		}
		
		#bankModel .payheader p {
			margin-left: 1.9rem;
		}
		
		#bankModel .changeCard {
			height: 1rem;
			border-top: #E5E5E5 solid 1px;
			font-size: 0.3rem;
		}
		
		#bankModel .changeCard p {
			margin-left: 2rem;
		}
		
		#bankModel .changeCard img {
			height: 0.34rem;
			width: auto;
			margin-left: 2rem;
		}
		/*降费率*/
		.feilv{font-size: 0.3rem;color: #0D6FB8;position: absolute;top: 5.5rem;right: 0.6rem;}
		/*二维码窗口*/
		.erCodeBox{height: 5.4rem;}
	</style>

	<body>
		<!--头部header开始-->
		<!--<header class="flex flex-align-center">
			<div class="left flex flex-align-center">
				<!--<img src="img/arrleft.png" alt="" class="arrleft" />-->
			</div>
			<!--<div class="title">收款</div>
			<div class="right flex flex-pack-center flex-align-center" onclick="Util.jump('./lowerRates.html')">降费率</div>
		</header>-->
		<!--头部header结束-->
		<!--导航nav部分开始-->
		<div class="nav">
			<div id="paylist">
				<!--支付列表-->
			</div>
			<!--<div class="icon flex flex-align-center flex-pack-center">
				<p>...</p>
			</div>-->
		</div>
		<!--导航nav部分结束-->
		<!--输入框-->
		<div class="box flex">
			<p style="color: #0D6FB8;font-size: 0.6rem;font-weight: bold;margin-left: 0.5rem;width: 0.7rem;">￥</p>
			<div class="input">请输入收款金额</div>
			<p class="feilv" onclick="Util.jump('./lowerRates.html')">降费率</p>
		</div>
		<!-- 自定义键盘开始-->
		<div class="keyboard">
			<div class="row border flex">
				<div class="key">1</div>
				<div class="key">2</div>
				<div class="key">3</div>
				<div class="key" style="border-right: none;">=</div>
			</div>
			<div class="row border flex">
				<div class="key">4</div>
				<div class="key">5</div>
				<div class="key">6</div>
				<div class="key" style="border-right: none;">
					<img src="img/back.png" alt="" />
				</div>
			</div>
			<div class="bottom flex">
				<div class="rowbox">
					<div class="row border flex">
						<div class="key">7</div>
						<div class="key">8</div>
						<div class="key" style="border-right: none;">9</div>
					</div>
					<div class="row border flex">
						<div class="key">0</div>
						<div class="key">+</div>
						<div class="key" style="border-right: none;">.</div>
					</div>
				</div>
				<div class="quer flex flex-pack-center flex-v">
					<p>确认</p>
					<p>收款</p>
				</div>
			</div>
		</div>
		<!-- 自定义键盘结束-->
		<!--收款model框开始-->
		<div class="model" id="mainModel"  hidden>
			<div class="modelcont">
				<div class="mdheader border flex ">
					<div>
						<img src="img/close.png" alt="" id="close" />
					</div>
					<p style="margin-left: 2.54rem;">收款</p>
				</div>
				<div class="text border">
					<p>￥<span id="money">1.00</span></p>
				</div>
				<!--收款方式开始-->
				<div class="item border flex flex-align-center" id="payMethod">
					<!--支付方式列表模板teamlate-->
				</div>
				<!--收款方式结束-->
				<!--银行卡开始-->
				<div class="item border flex flex-align-center" id="bankCard">
					<!--信用卡列表默认方式teamlate-->
				</div>
				<!--银行卡结束-->
				<div class="buttomquer flex flex-align-center flex-pack-center" id='buttomquer'>
					<p>确认收款</p>
				</div>
			</div>
		</div>
		<!--收款model框结束-->
		<!--选择收款方式开始-->
		<div class="model" id="payModel" hidden>
			<div class="modelcont">
				<div class="payheader flex flex-align-center">
					<img src="img/marrleft.png" />
					<p>选择收款方式</p>
				</div>
				<div id="wrapper">
					<ul id="payWrapper">
						<!--通道列表template_payWrapper-->
					</ul>
				</div>
			</div>
		</div>
		<!--选择收款方式结束-->
		<!--选择银行卡开始-->
		<div class="model" id="bankModel" hidden>
			<div class="modelcont">
				<div class="payheader  flex flex-align-center">
					<img src="img/marrleft.png" />
					<p>选择信用卡</p>
				</div>
				<div id="wrapperbank">
					<ul id="wrapperbankCard">
						<!--信用卡列表template_wrapperbankCard-->
					</ul>
				</div>
				<!--使用新卡付款开始-->
				<div class="changeCard flex flex-align-center" onclick="Util.jump('bankCreditInfo.html')">
					<p>使用新卡付款</p>
					<img src="img/rightarr.png" alt="" />
				</div>
			</div>
		</div>
		<!--选择银行卡结束-->
	<!--支付方式列表模板开始-->
	<script type="text/html" id="template_paylist">
		<%for(var i in data){%>
		<div class="icon" data-status="<%= data[i].status %>" >
				<div class="img flex flex-align-center flex-pack-center " data-paytype="<%= data[i].payType %>">
					<%if(data[i].status == 1){%>
					<img src="<%= data[i].icon[0] %>" alt="" />
					<%}else{%>
						<img src="<%= data[i].iconDis %>" alt="" />
					<%}%>
				</div>
				<div class="text flex flex-align-center flex-pack-center">
					<p><%= data[i].name %></p>
				</div>
		</div>
		<%}%>
	</script><!--支付方式列表模板结束-->
	<!--Mainmodel默认通道显示模板开始-->
	<script type="text/html" id="template_payMethod">
		<div class="itemleft" data-scenes="<%= data.channels[0].scenes %>" data-trade="<%= data.channels[0].tradeRuleNo %>" id = "tradeRuleNo" data-otherparam="&otherParam[bizType]=<%= data.channels[0].otherParam.bizType %>">
						<div class="itemlefthead flex flex-align-center">
							<img src="<%= data.channels[0].payIcon %>" />
							<div class="tis"><%= data.channels[0].channelName %></div>
							<div class="td"><%= data.channels[0].arrivalDate %></div>
							<div class="feil">费率<%= data.channels[0].currentRate %></div>
						</div>
						<div class="itemlefttis">
							<%if(data.channels[0].available == true){%>
							<%= data.channels[0].arrivalDateExplain %>
							<%}else if(data.channels[0].enabled == 0){%>
								<span style="color: red;"><%= data.channels[0].remark%><span>
							<%}else{%>
								<span style="color: red;">金额：<%= data.channels[0].tradeMinAmt/100 %>~<%= data.channels[0].tradeMaxAmt/100 %>元,交易时间：<%= data.channels[0].startTime %>~<%= data.channels[0].endTime %><span>
							<%}%>
						</div>
					</div>
					<div class="rightarr flex flex-align-center">
			<img src="img/rightarr.png" />
		</div>
	</script><!--Mainmodel默认通道显示模板开始-->
	<!--Mainmodel默认通道显示模板开始微信&支付宝-->
	<script type="text/html" id="template_payMethod_wechat">
		<div class="itemleft" data-scenes="<%= data.channels[2].scenes %>" data-trade="<%= data.channels[2].tradeRuleNo %>" id = "tradeRuleNo" data-otherparam="&otherParam[bizType]=<%= data.channels[2].otherParam.bizType %>">
						<div class="itemlefthead flex flex-align-center">
							<img src="<%= data.channels[2].payIcon %>" />
							<div class="tis"><%= data.channels[2].channelName %></div>
							<div class="td"><%= data.channels[2].arrivalDate %></div>
							<div class="feil">费率<%= data.channels[2].currentRate %></div>
						</div>
						<div class="itemlefttis">
							<%if(data.channels[2].available == true){%>
							<%= data.channels[2].arrivalDateExplain %>
							<%}else if(data.channels[2].enabled == 0){%>
								<span style="color: red;"><%= data.channels[2].remark%><span>
							<%}else{%>
								<span style="color: red;">金额：<%= data.channels[2].tradeMinAmt/100 %>~<%= data.channels[2].tradeMaxAmt/100 %>元,交易时间：<%= data.channels[2].startTime %>~<%= data.channels[2].endTime %><span>
							<%}%>
						</div>
					</div>
					<div class="rightarr flex flex-align-center">
			<img src="img/rightarr.png" />
		</div>
	</script><!--Mainmodel默认通道显示模板结束桌牌码-->
	<!--Mainmodel默认通道显示模板开始京东-->
	<script type="text/html" id="template_payMethod_jd">
		<div class="itemleft" data-scenes="<%= data.channels[0].scenes %>" data-trade="<%= data.channels[0].tradeRuleNo %>" id = "tradeRuleNo" data-otherparam="&otherParam[bizType]=<%= data.channels[0].otherParam.bizType %>">
						<div class="itemlefthead flex flex-align-center">
							<img src="<%= data.channels[0].payIcon %>" />
							<div class="tis"><%= data.channels[0].channelName %></div>
							<div class="td"><%= data.channels[0].arrivalDate %></div>
							<div class="feil">费率<%= data.channels[0].currentRate %></div>
						</div>
						<div class="itemlefttis">
							<%if(data.channels[0].available == true){%>
							<%= data.channels[0].arrivalDateExplain %>
							<%}else if(data.channels[0].enabled == 0){%>
								<span style="color: red;"><%= data.channels[0].remark%><span>
							<%}else{%>
								<span style="color: red;">金额：<%= data.channels[0].tradeMinAmt/100 %>~<%= data.channels[0].tradeMaxAmt/100 %>元,交易时间：<%= data.channels[0].startTime %>~<%= data.channels[0].endTime %><span>
							<%}%>
						</div>
					</div>
					<div class="rightarr flex flex-align-center">
			<img src="img/rightarr.png" />
		</div>
	</script><!--Mainmodel默认通道显示模板结束京东-->
	<!--Mainmodel默认信用卡模板开始-->
	<script type="text/html" id="template_bankCard">
		<div class="itemleft flex flex-align-center" data-id="<%= data.unionBank[0].id %>" id="cardNo" >
			<img src="<%= data.unionBank[0].icon %>" alt="" />
				<p><%= data.unionBank[0].bankName %>（<%= data.unionBank[0].acctNo %>）</p>
				</div>
			<div class="rightarr flex flex-align-center">
			<img src="img/rightarr.png" />
		</div>
	</script><!--Mainmodel默认信用卡模板结束-->
	<!--选择收款方式列表开始-->
	<script type="text/html" id="template_payWrapper">
		<%for(var i in data.channels){%>
		<li>
			<!--收款方式开始-->
			<div class="item border flex flex-align-center <%if(data.channels[i].available == false){%>item-flase <%}%>" id="channelslist" data-scenes="<%= data.channels[i].scenes %>" data-trade="<%= data.channels[i].tradeRuleNo %>" data-otherparam="&otherParam[bizType]=<%= data.channels[i].otherParam.bizType %>">
				<div class="itemleft">
					<div class="itemlefthead flex flex-align-center">
						<img src="<%= data.channels[i].payIcon %>" />
						<div class="tis"><%= data.channels[i].channelName %></div>
						<div class="td"><%= data.channels[i].arrivalDate %></div>
						<div class="feil">费率<%= data.channels[i].currentRate %></div>
					</div>
					<div class="itemlefttis">
						<%if(data.channels[i].available == true){%>
							<%= data.channels[i].arrivalDateExplain %>
							<%}else if(data.channels[i].enabled == 0){%>
								<span style="color: red;"><%= data.channels[i].remark%><span>
							<%}else{%>
							<span style="color: red;">金额：<%= data.channels[i].tradeMinAmt/100 %>~<%= data.channels[i].tradeMaxAmt/100 %>元,交易时间：<%= data.channels[i].startTime %>~<%= data.channels[i].endTime %><span>
						<%}%>
					</div>
				</div>
				<div class="rightarr flex flex-align-center">
					<img src="img/xz.png" />
				</div>
			</div>
			<!--收款方式结束-->
		</li>
		<%}%>
	</script>
	<!--选择信用卡列表开始-->
	<script type="text/html" id="template_wrapperbankCard">
		<%for(var i in data.unionBank){%>
		<li>
			<!--银行卡开始-->
			<div class="item border flex flex-align-center" data-id="<%= data.unionBank[i].id %>" id="bankCardlist">
				<div class="itemleft flex flex-align-center">
					<img src="<%= data.unionBank[i].icon %>" alt="" />
						<p><%= data.unionBank[i].bankName %>（<%= data.unionBank[i].acctNo %>）</p>
				</div>
					<div class="rightarr flex flex-align-center">
							<img src="img/xz.png" />
					</div>
				</div>
			<!--银行卡结束-->
		</li>
		<%}%>
	</script><!--选择信用卡列表结束-->
	</body>
	<script type="text/javascript" src="js/rem.js"></script>
	<script type="text/javascript" src="js/zepto.js"></script>
	<script type="text/javascript" src="js/template.js"></script>
	<script type="text/javascript" src="js/layer.js"></script>
	<script type="text/javascript" src="js/api.js"></script>
	<script type="text/javascript" src="js/common.js"></script>
	<script type="text/javascript" src="js/iscroll.js"></script>
	<script type="text/javascript">
		Public.login();
		$('#buttomquer').click(function(){ //model框确认支付按钮响应方法
			var cardNo = $("#cardNo").data('id'); //银行卡id
			var tradeAmt = $("#money").text()*100; //金额
			var scenes = $("#tradeRuleNo").data('scenes'); //支付场景
			var tradeRuleNo = $("#tradeRuleNo").data('trade')+$("#tradeRuleNo").data('scenes'); //支付路由
			var otherparam = $('#tradeRuleNo').data('otherparam'); //银联.特惠2，3区别参数
			if(scenes == '07'){ //场景为07为网页支付，其它为sdk支付方式
				if(tradeRuleNo == 'JINYI_PAY_4007'){ //银联.在线
					if(Number(10000)<=parseFloat(tradeAmt) && parseFloat(tradeAmt)<=Number(2000000)){
						Util.jump(API.skipCreatOrderPage+'?version=1.0.2&method=channel.order.create&cardNo='+cardNo+'&tradeAmt='+tradeAmt+'&tradeRuleNo='+tradeRuleNo+'&userId='+localStorage.userId)+otherparam;
					}else{
						layer.open({content:'交易金额只能为100.00~20000.00元',skin: 'msg',time: 2});
					}
				}else if(tradeRuleNo == 'VC_PAY_4007'){ //银联.特惠
					if(Number(50000)<=parseFloat(tradeAmt) && parseFloat(tradeAmt)<=Number(2000000)){
						Util.jump(API.skipCreatOrderPage+'?version=1.0.2&method=channel.order.create&cardNo='+cardNo+'&tradeAmt='+tradeAmt+'&tradeRuleNo='+tradeRuleNo+'&userId='+localStorage.userId);
					}else{
						layer.open({content:'交易金额只能为500.00~20000.00元',skin: 'msg',time: 2});
					}
				}else if(tradeRuleNo == 'VC_EB_PAY_4007'){ //
						if(Number(10000)<=parseFloat(tradeAmt) && parseFloat(tradeAmt)<=Number(2000000)){
						Util.jump(API.skipCreatOrderPage+'?version=1.0.2&method=channel.order.create&cardNo='+cardNo+'&tradeAmt='+tradeAmt+'&tradeRuleNo='+tradeRuleNo+'&userId='+localStorage.userId)+otherparam;
					}else{
						layer.open({content:'交易金额只能为100.00~20000.00元',skin: 'msg',time: 2});
					}
				}else if(tradeRuleNo == 'JINYI_POINT_PAY_4007'){ //银联.积分A
						if(Number(10000)<=parseFloat(tradeAmt) && parseFloat(tradeAmt)<=Number(2000000)){
						Util.jump(API.skipCreatOrderPage+'?version=1.0.2&method=channel.order.create&cardNo='+cardNo+'&tradeAmt='+tradeAmt+'&tradeRuleNo='+tradeRuleNo+'&userId='+localStorage.userId)+otherparam;
					}else{
						layer.open({content:'交易金额只能为100.00~20000.00元',skin: 'msg',time: 2});
					}
				}else if(tradeRuleNo == 'VC_EB_POINT_PAY_4007'){ //银联.积分B
						if(Number(10000)<=parseFloat(tradeAmt) && parseFloat(tradeAmt)<=Number(2000000)){
						Util.jump(API.skipCreatOrderPage+'?version=1.0.2&method=channel.order.create&cardNo='+cardNo+'&tradeAmt='+tradeAmt+'&tradeRuleNo='+tradeRuleNo+'&userId='+localStorage.userId)+otherparam;
					}else{
						layer.open({content:'交易金额只能为100.00~20000.00元',skin: 'msg',time: 2});
					}
				}else if(tradeRuleNo == 'JINYI_MIN_PAY_4007'){ //银联小额.免密
						if(Number(10000)<=parseFloat(tradeAmt) && parseFloat(tradeAmt)<=Number(500000)){
						Util.jump(API.skipCreatOrderPage+'?version=1.0.2&method=channel.order.create&cardNo='+cardNo+'&tradeAmt='+tradeAmt+'&tradeRuleNo='+tradeRuleNo+'&userId='+localStorage.userId)+otherparam;
					}else{
						layer.open({content:'交易金额只能为100.00~5000.00元',skin: 'msg',time: 2});
					}
				}else if(tradeRuleNo == 'VC_NEWEB_PAY_4007'){ //银联.快捷C
						if(Number(10000)<=parseFloat(tradeAmt) && parseFloat(tradeAmt)<=Number(2000000)){
						Util.jump(API.skipCreatOrderPage+'?version=1.0.2&method=channel.order.create&cardNo='+cardNo+'&tradeAmt='+tradeAmt+'&tradeRuleNo='+tradeRuleNo+'&userId='+localStorage.userId)+otherparam;
					}else{
						layer.open({content:'交易金额只能为100.00~20000.00元',skin: 'msg',time: 2});
					}
				}else if(tradeRuleNo == 'JIANLIN_PAY_02_4007'){ //银联.快捷D
						if(Number(10000)<=parseFloat(tradeAmt) && parseFloat(tradeAmt)<=Number(2000000)){
						Util.jump(API.skipCreatOrderPage+'?version=1.0.2&method=channel.order.create&cardNo='+cardNo+'&tradeAmt='+tradeAmt+'&tradeRuleNo='+tradeRuleNo+'&userId='+localStorage.userId)+otherparam;
					}else{
						layer.open({content:'交易金额只能为100.00~20000.00元',skin: 'msg',time: 2});
					}
				}else if(tradeRuleNo == 'EB_SKB_PAY_T0_4007'){ //银联.积分D
						if(Number(10000)<=parseFloat(tradeAmt) && parseFloat(tradeAmt)<=Number(2000000)){
						Util.jump(API.skipCreatOrderPage+'?version=1.0.2&method=channel.order.create&cardNo='+cardNo+'&tradeAmt='+tradeAmt+'&tradeRuleNo='+tradeRuleNo+'&userId='+localStorage.userId)+otherparam;
					}else{
						layer.open({content:'交易金额只能为100.00~20000.00元',skin: 'msg',time: 2});
					}
				}else if(tradeRuleNo == 'EB_SKB_PAY_T1_4007'){ //银联.积分T1
						if(Number(10000)<=parseFloat(tradeAmt) && parseFloat(tradeAmt)<=Number(2000000)){
						Util.jump(API.skipCreatOrderPage+'?version=1.0.2&method=channel.order.create&cardNo='+cardNo+'&tradeAmt='+tradeAmt+'&tradeRuleNo='+tradeRuleNo+'&userId='+localStorage.userId)+otherparam;
					}else{
						layer.open({content:'交易金额只能为100.00~20000.00元',skin: 'msg',time: 2});
					}
				}else if(tradeRuleNo == 'UNH_JK_PAY_4007'){ //银联.积分G
						if(Number(300000)<=parseFloat(tradeAmt) && parseFloat(tradeAmt)<=Number(2000000)){
						Util.jump(API.skipCreatOrderPage+'?version=1.0.2&method=channel.order.create&cardNo='+cardNo+'&tradeAmt='+tradeAmt+'&tradeRuleNo='+tradeRuleNo+'&userId='+localStorage.userId)+otherparam;
					}else{
						layer.open({content:'交易金额只能为3000.00~20000.00元',skin: 'msg',time: 2});
					}
				}else if(tradeRuleNo == 'UNH_E00_PAY_4007'){ //银联.积分F
						if(Number(10000)<=parseFloat(tradeAmt) && parseFloat(tradeAmt)<=Number(2000000)){
						Util.jump(API.skipCreatOrderPage+'?version=1.0.2&method=channel.order.create&cardNo='+cardNo+'&tradeAmt='+tradeAmt+'&tradeRuleNo='+tradeRuleNo+'&userId='+localStorage.userId)+otherparam;
					}else{
						layer.open({content:'交易金额只能为100.00~20000.00元',skin: 'msg',time: 2});
					}
				}
			}else if(scenes == '03'){
				// sdk下单接口
				layer.open({type: 2}); //loading层
				Public.sdkPay({
					method: 'channel.order.create',
					version: '1.0.2',
					tradeAmt: tradeAmt, //交易金额（分）
					userId: localStorage.userId, 
					cardNo: cardNo, //银行卡号
					tradeRuleNo: tradeRuleNo //路由编号
				},function(res){
					tradeAmt = (tradeAmt/100).toFixed(2);
					Util.jump('./sdkPay.html?orderNo='+res.data.orderNo+'&cardNo='+cardNo+'&tradeAmt='+tradeAmt+'&orderId='+res.data.orderId);
				});
			}else if(scenes == '01'){
				layer.open({type: 2}); //loading层
				Public.sdkPay({
					method: 'channel.order.create',
					version: '1.0.2',
					tradeAmt: tradeAmt, //交易金额（分）
					userId: localStorage.userId, 
					cardNo: '', //银行卡号
					tradeRuleNo: tradeRuleNo //路由编号
				},function(res){
					tradeAmt = (tradeAmt/100).toFixed(2);
					sessionStorage.imgUrl = res.data.imgUrl;
					console.log(res);
					Util.jump('./erCodePay.html?orderId='+res.data.id+'&tradeAmt='+tradeAmt);
				});
			}
		});
		
		function confirmPayment(){ //确认支付按钮拉取数据封装方法
			var paytype = $('.imgon').data('paytype'); //获取支付列表中的支付方式
				Public.Confirm({
						method: 'channel.query.mercha.all',
						version:'1.0.2',
				        userId: localStorage.userId,//userId需动态获取
				        payType: paytype
					},function(res){
						console.log(res);
						if(paytype == 40 && res.data.unionBank.length == 0){ //支付方式为银联快捷，判断是否提交信用卡资料
								layer.open({
									  content: '未提交信用卡资料',
									  btn: ['去提交','取消'],
									  shadeClose: false,
									  yes: function(index){
									  	  Util.jump('Auth.html');
			      						  layer.close(index);
									  }
								});
						}else{
							if(res.data.channels.length == 0){ //判断通道是否可用*剔除桌牌码
								layer.open({content:'该支付方式暂不支持',skin: 'msg',time: 2});
							}
								else if(paytype == 10){ //微信支付
								$("#bankCard").css('display','none');
								$("#mainModel").show();
								$('.modelcont').addClass('erCodeBox');
								payMethod = template.render("template_payMethod_wechat", res);
								$("#payMethod").html(payMethod).unbind("click");
								sessionStorage.payMode = 'wechat';
							}
							else if(paytype == 20){ //支付宝支付
								$("#bankCard").css('display','none');
								$("#mainModel").show();
								$('.modelcont').addClass('erCodeBox');
								payMethod = template.render("template_payMethod_wechat", res);
								$("#payMethod").html(payMethod).unbind("click");
								sessionStorage.payMode = 'aliPay';
							}
							else if(paytype == 60){ //京东支付
								$("#bankCard").css('display','none');
								$("#mainModel").show();
								$('.modelcont').addClass('erCodeBox');
								payMethod = template.render("template_payMethod_jd", res);
								$("#payMethod").html(payMethod).unbind("click");
								sessionStorage.payMode = 'JD';
							}
							else{
								if($('.modelcont').hasClass('erCodeBox')){
									$('.modelcont').removeClass('erCodeBox');
									$("#bankCard").css('display','flex');
								}
								$("#mainModel").show();
								payMethod = template.render("template_payMethod", res);
								$("#payMethod").html(payMethod);
								bankCard = template.render("template_bankCard", res);
								$("#bankCard").html(bankCard);
								//选择通道
								$("#payMethod").click(function() { //切换可用通道
									$('#payModel').show();
									payWrapper = template.render("template_payWrapper", res);
									$("#payWrapper").html(payWrapper);
								//滚动脚本初始化
								var myScroll = new IScroll('#wrapper', {mouseWheel: true,click: true,tap: true});
								$(document).on('click','#channelslist',function(){
									    // 首先判断通道能否可用 然后再做相关页面数据传递
									    if(!$(this).hasClass('item-flase')){
									    	$("#payMethod").children('.itemleft').attr('data-scenes',$(this).data('scenes'));
											$("#payMethod").children('.itemleft').attr('data-trade',$(this).data('trade'));
											$("#payMethod").children('.itemleft').attr('data-otherparam',$(this).data('otherparam'));
											$("#payMethod").children('.itemleft').find('img').attr('src',$(this).children('.itemleft').find('img').attr('src'));
											$("#payMethod").children('.itemleft').find('.tis').text($(this).children('.itemleft').find('.tis').text());
											$("#payMethod").children('.itemleft').find('.td').text($(this).children('.itemleft').find('.td').text());
											$("#payMethod").children('.itemleft').find('.feil').text($(this).children('.itemleft').find('.feil').text());
											$("#payMethod").children('.itemleft').find('.itemlefttis').text($(this).children('.itemleft').find('.itemlefttis').text());
											$(this).find(".rightarr").children('img').show();
											$(this).parent('li').siblings().find(".rightarr").children('img').hide();
											setTimeout(function() {$('.payheader').parents(".model").hide();},300);	
									    }
								});
								});
								//选择信用卡
								$("#bankCard").click(function() {
									$('#bankModel').show();
									wrapperbankCard = template.render("template_wrapperbankCard", res);
									$("#wrapperbankCard").html(wrapperbankCard);
									//滚动脚本初始化
									var myScroll = new IScroll('#wrapperbank', {mouseWheel: true,click: true,tap: true});
									$(document).on('click','#bankCardlist',function(){
										$("#bankCard").children('.itemleft').attr('data-id',$(this).data('id'));
										$("#bankCard").children('.itemleft').find('img').attr('src',$(this).children('.itemleft').find('img').attr('src'));
										$("#bankCard").children('.itemleft').find('p').text($(this).children('.itemleft').find('p').text());
										$(this).find(".rightarr").children('img').show();
										$(this).parent('li').siblings().find(".rightarr").children('img').hide();
										setTimeout(function() {$('.payheader').parents(".model").hide();},200);
									});
								});
							}
						}
					});
		}
		$(function() {//拉取支付方式
			Public.ChangePayByRece({
				method:'channel.query',
       			version:'1.0.2'
			}, function(res){
				console.log(res);
				html = template.render("template_paylist", res);
				$('#paylist').html(html);
				$('#paylist').children(".icon").first().children('.img').addClass('imgon');
				//icon点击响应事件
				$('.icon').click(function() {
					if($(this).data('status')===1){
						$(this).children('.img').addClass('imgon');
						$(this).siblings().children('.img').removeClass('imgon');
					}				
				});
			});
			
			//键盘确认收款按钮响应事件
			$('.quer').click(function() {
				var money = $(".input").text();
				var regz = new RegExp("^[1-9]*[1-9][0-9]*$"); //正整型正则匹配
				var regf = new RegExp("^(([0-9]+\\.[0-9]*[1-9][0-9]*)|([0-9]*[1-9][0-9]*\\.[0-9]+)|([1-9]*[1-9][0-9]*))$"); //浮点型正则匹配
				if(regz.test(money)) {
					money = money + '.00';
					$(".input").text(money);
					$("#money").text(money);
					confirmPayment();
				} else if(regf.test(money) && money.split('.')[1].length <= 2) {
					$("#money").text(money);
					confirmPayment();
				} else {
					layer.open({
						content: '请输入有效金额',
						skin: 'msg',
						time: 2 //2秒后自动关闭
					});
				}
			});
			
			/*---------------------------- 收款model -----------------------------------*/
			//主model框关闭响应事件
			$('#close').click(function() {
				$('#mainModel').hide();
			});

			/*------------------ 选择通道及信用卡列表model关闭响应事件----------------------*/
			$('.payheader').click(function() {
				$(this).parents(".model").hide();
			});
			
			/*-------------------------------- 键盘key-----------------------------------*/
			//键盘点击事件
			$(".key").click(function() {
				var val = $(this).text();
				if(val == '1' || val == '2' || val == '3' || val == '4' || val == '5' || val == '6' || val == '7' || val == '8' || val == '9' || val == '0' || val == '.') {
					var money = $(".input").text();
					if(money == '请输入收款金额') {
						$(".input").text(val).addClass('on');
					} else {
						money = money + val;
						$(".input").text(money).addClass('on');
					}
				} else if(val == '+') {
					if($(".input").text() != '请输入收款金额' && $(".input").text() != '') {
						var money = $(".input").text();
						money = money + val;
						$(".input").text(money).addClass('on');
					}
				} else if(val == '=') {
					var sum = 0;
					var arr = new Array();
					var money = $(".input").text();
					arr = money.split('+');
					if(arr.length == 1 && money.split('.').length == 1 && $(".input").text() != '请输入收款金额' && $(".input").text() != '') {
						var money = $(".input").text();
						money = money + '.00';
						$(".input").text(money);
					} else if(arr.length > 1) {
						for(var i = 0; i < arr.length; i++) {
							sum += Number(arr[i]);
						}
						if(money.split('.').length == 1 && $(".input").text() != '请输入收款金额' && $(".input").text() != '') {
							$('.input').text(sum + '.00');
						} else if($(".input").text() != '请输入收款金额' && $(".input").text() != '') {
							$('.input').text(sum);
						}
					}
				} else {
					var money = $(".input").text();
					if($(".input").text() != '请输入收款金额') {
						money = money.substring(0, money.length - 1);
						$('.input').text(money);
					}
				}
			});
		})
	</script>

</html>